package com.guichun.oop.base;

/**
 * @author guichun
 * @version 1.0.0
 * @ClassName Demo1.java
 * @email onebigbai@icloud.com
 * @Description 面向对象的说明
 * @createTime 2021-03-01
 */
public class Demo1 {
        private String name;
        private Double latitude;
        private Double longitude;



    public Demo1(String name, Double latitude, Double longitude) {
        this.name = name;
        this.latitude = latitude;
        this.longitude = longitude;
    }

    public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public Double getLatitude() {
            return latitude;
        }

        public void setLatitude(Double latitude) {
            this.latitude = latitude;
        }

        public Double getLongitude() {
            return longitude;
        }

        public void setLongitude(Double longitude) {
            this.longitude = longitude;
        }

    @Override
    public String toString() {
        return "Demo1{" +
                "name='" + name + '\'' +
                ", latitude=" + latitude +
                ", longitude=" + longitude +
                '}';
    }

    /*
     * 行为方法（方法重载）
     * */
    public void run() {
        System.out.println("行为方法");
    }
    public void run(String name) {
        System.out.println(name + "在执行这个行为方法");
    }
    public void run(String name, Double latitude, Double longitude) {
        System.out.println(name + "在这个地方" + latitude + "," + longitude + "执行这个方法");
    }
}
